/*
 * Created by JFormDesigner on Thu Oct 27 21:00:01 CST 2022
 */

package com.liyu.ui;

import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;


/**
 * @author destiny
 */
public class GoodsFrame extends JFrame {
    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JMenuBar menuBar;
    private JMenu selfMenu;
    private JMenuItem menuItem1;
    private JMenuItem menuItem2;
    private JMenuItem menuItem6;
    private JMenu helpMenu;
    private JMenuItem menuItem3;
    private JMenuItem menuItem4;
    private JMenu masterMenu;
    private JMenuItem menuItem5;
    private JMenuItem menuItem7;
    private JPanel panel2;
    private JScrollPane goodInfoScrollPane;
    private JTable goodInfoTable;
    private JPanel panel1;
    private JButton button2;
    private JLabel label1;
    private JButton button3;
    private JLabel label2;
    private JButton button4;

    public GoodsFrame() {
        initComponents();
    }

    private void table1MouseClicked(MouseEvent e) {
        // TODO add your code here
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        menuBar = new JMenuBar();
        selfMenu = new JMenu();
        menuItem1 = new JMenuItem();
        menuItem2 = new JMenuItem();
        menuItem6 = new JMenuItem();
        helpMenu = new JMenu();
        menuItem3 = new JMenuItem();
        menuItem4 = new JMenuItem();
        masterMenu = new JMenu();
        menuItem5 = new JMenuItem();
        menuItem7 = new JMenuItem();
        panel2 = new JPanel();
        goodInfoScrollPane = new JScrollPane();
        goodInfoTable = new JTable();
        panel1 = new JPanel();
        button2 = new JButton();
        label1 = new JLabel();
        button3 = new JButton();
        label2 = new JLabel();
        button4 = new JButton();

        //======== this ========
        Container contentPane = getContentPane();
        contentPane.setLayout(null);

        //======== menuBar ========
        {

            //======== selfMenu ========
            {
                selfMenu.setText("\u6211\u7684");

                //---- menuItem1 ----
                menuItem1.setText("\u4e2a\u4eba\u4fe1\u606f\u7ba1\u7406>");
                selfMenu.add(menuItem1);

                //---- menuItem2 ----
                menuItem2.setText("\u4e2a\u4eba\u5546\u54c1\u7ba1\u7406>");
                menuItem2.setEnabled(false);
                selfMenu.add(menuItem2);

                //---- menuItem6 ----
                menuItem6.setText("\u5546\u54c1\u6d4f\u89c8>");
                selfMenu.add(menuItem6);
            }
            menuBar.add(selfMenu);

            //======== helpMenu ========
            {
                helpMenu.setText("\u5e2e\u52a9");

                //---- menuItem3 ----
                menuItem3.setText("\u83b7\u53d6\u66f4\u65b0");
                helpMenu.add(menuItem3);

                //---- menuItem4 ----
                menuItem4.setText("\u4f7f\u7528\u8bf4\u660e");
                helpMenu.add(menuItem4);
            }
            menuBar.add(helpMenu);

            //======== masterMenu ========
            {
                masterMenu.setText("\u7ba1\u7406");

                //---- menuItem5 ----
                menuItem5.setText("\u524d\u5f80\u7ba1\u7406\u5458\u754c\u9762>");
                masterMenu.add(menuItem5);

                //---- menuItem7 ----
                menuItem7.setText("\u524d\u5f80\u7528\u6237\u754c\u9762>");
                masterMenu.add(menuItem7);
            }
            menuBar.add(masterMenu);
        }
        contentPane.add(menuBar);
        menuBar.setBounds(0, 0, 803, 22);

        //======== panel2 ========
        {
            panel2.setLayout(new BorderLayout());

            //======== goodInfoScrollPane ========
            {

                //---- goodInfoTable ----
                goodInfoTable.setModel(new DefaultTableModel(
                        new Object[][]{
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                                {null, null, null, null},
                        },
                        new String[]{
                                "\u5546\u54c1ID", "\u5546\u54c1\u540d", "\u5546\u54c1\u6570\u91cf", "\u5546\u54c1\u4ef7\u683c"
                        }
                ) {
                    Class<?>[] columnTypes = new Class<?>[]{
                            String.class, Object.class, Integer.class, Double.class
                    };

                    @Override
                    public Class<?> getColumnClass(int columnIndex) {
                        return columnTypes[columnIndex];
                    }
                });
                goodInfoTable.setPreferredSize(null);
                goodInfoTable.setPreferredScrollableViewportSize(new Dimension(450, 300));
                goodInfoTable.addMouseListener(new MouseAdapter() {
                    @Override
                    public void mouseClicked(MouseEvent e) {
                        table1MouseClicked(e);
                    }
                });
                goodInfoScrollPane.setViewportView(goodInfoTable);
            }
            panel2.add(goodInfoScrollPane, BorderLayout.CENTER);

            //======== panel1 ========
            {
                panel1.setLayout(new FlowLayout());

                //---- button2 ----
                button2.setText("\u6dfb\u52a0\u5546\u54c1");
                panel1.add(button2);

                //---- label1 ----
                label1.setText("        ");
                panel1.add(label1);

                //---- button3 ----
                button3.setText("\u4fee\u6539\u5546\u54c1");
                panel1.add(button3);

                //---- label2 ----
                label2.setText("      ");
                panel1.add(label2);

                //---- button4 ----
                button4.setText("\u5220\u9664\u5546\u54c1");
                panel1.add(button4);
            }
            panel2.add(panel1, BorderLayout.SOUTH);
        }
        contentPane.add(panel2);
        panel2.setBounds(0, 22, 605, 400);

        {
            // compute preferred size
            Dimension preferredSize = new Dimension();
            for (int i = 0; i < contentPane.getComponentCount(); i++) {
                Rectangle bounds = contentPane.getComponent(i).getBounds();
                preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
            }
            Insets insets = contentPane.getInsets();
            preferredSize.width += insets.right;
            preferredSize.height += insets.bottom;
            contentPane.setMinimumSize(preferredSize);
            contentPane.setPreferredSize(preferredSize);
        }
        setSize(620, 460);
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
